def my_pow_def(p1,p2 =2):  #default para
    return p1**p2
print(my_pow_def(3))

def my_sum(*nums):        #list para
    sum = 0
    for i in nums:
        print(i,end = ' ')
        sum = sum + i
    print('\n')
    return sum
print(my_sum(1,2))
print(my_sum(1,2,3,4))
'''
#会报错，为什么？
l1 = [1,2,3]
print(my_sum(l1))
'''
def my_test(**pstu):
    for k,v in pstu.items():
        print(type(k),type(v))
        print(k,v)
my_test(p1 = 'zs', p2 = 'ls')

'''
#会报错，为什么？
stu = {'p1':'zs','p2':'ls'}
my_test(stu)

'''